let commitBtn = $("commit-btn");

$.get("/user/info", (result, error) => templatesCommitBtn(result.status === 200));

function templatesCommitBtn(isLogin) {
    if (isLogin) {
        commitBtn.append('<button class="btn btn-success" onclick="commitArticle()">提交</button>');
    } else {
        commitBtn.append('<button class="btn btn-danger" onclick="" disabled="disabled">登录后发帖哦！</button>');
    }
}
